c="Test du schéma"||'0a'x||"1- Vérifier les références "||'0a'x||"2- Vérifier les valeurs "||'0a'x||"3- Vérifier les connexions "||'0a'x||"4- Vérifier les liaisons "||'0a'x||"5- Tester présence doublons"||'0a'x
c=c||"6- Enchaîner tous les tests"||'0a'x||"7- Abandonner "
'SELECT("'c'")'
c=result
select
when c=1 then call test_refs
when c=2 then call test_valeurs
when c=3 then call test_connexions
when c=4 then call test_liaisons
when c=5 then call test_doublets
when c=6 then do
call test_doublets
call test_refs
call test_valeurs
call test_connexions
call test_liaisons
end
otherwise do
'INIT(B,D,L,O,N)'
exit
end
end
call afficher_erreurs
'INIT(B,D,L,O,N)'
exit
test_refs:
'LOCK:TITLE("Vérification des références...")'
do i=1 to objets
'TYPE(O='i')'
if result=1 then do
'PARTNAME(O)'
if result~="ALIMENTATION" & result ~="MASSE" then do
'GETREF(O)'
if result=0 then do
'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"n''a pas de référence"+CHR(10)+"Voulez-vous continuer?")'
if result<1 then do
'UNLOCK'
return
end
'UNMARKCOMP(O)'
errrefs=errrefs+1
end
end
end
end
'UNLOCK'
return
test_valeurs:
'LOCK:TITLE("Vérification des valeurs..."):UNMARK(-1)'
do i=1 to objets
'TYPE(O='i')'
if result=1 then do
'PARTNAME(O)'
if result~="ALIMENTATION" & result ~="MASSE" then do
'GETVAL(O)'
if result=0 then do
'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"n''a pas de valeur"+CHR(10)+"Voulez-vous continuer?")'
'MARK(O,D):MESSAGE("Attention: la référence"+CHR(10)+READTEXT(GETREF(O))+CHR(10)+"est utilisée deux fois!")'
end
end
if i>=objets-1 then i=0
else i=i+1
end
end
'UNLOCK'
return
test_connexions:
'LOCK:TITLE("Vérification des liaisons aux composants..."):UNMARK(-1)'
i=1
do while i>0
'O=FINDOBJ('i',1,-1,-1)'; i=result
if i>0 then do
'PARTNAME(O)'
'DEVPINS(O)'; j=result
do k=1 to j
if connexion_broche(i,k)=0 then do
'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"a sa borne "+STR(IF(PINNUM(O,'k'),PINNUM(O,'k'),'k'))+" non connectée"+CHR(10)+"Voulez-vous continuer?")'
if result<1 then do
'UNLOCK'
return
end
'UNMARKCOMP(O)'
errconx=errconx+1
end
end
if i=objets then leave
i=i+1
end
end
'UNLOCK'
return
test_liaisons:
'LOCK:TITLE("Recherche et élimination lignes inutiles...")'